﻿using System;

using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Handrise.CDCable.Mobile.Business;

namespace Handrise.CDCable.Mobile.UI
{
    public partial class FrmPatrolType :FrmBase
    {
        private Plan plan;

        public FrmPatrolType()
        {
            InitializeComponent();
            ttlbrhead.Text = "巡视类型选择";
            ilstbcup.Images.Add(ResourceImage.空白);
            ilstbcup.Images.Add(ResourceImage.空白);
            ilstbcup.Images.Add(ResourceImage.返回01);
            ilstbcdown.Images.Add(ResourceImage.空白);
            ilstbcdown.Images.Add(ResourceImage.空白);
            ilstbcdown.Images.Add(ResourceImage.返回02);
        }

        private void FrmPatrolType_Load(object sender, EventArgs e)
        {
            if (IsReturn)
                LoadCacheData();
            else
                LoadData();
        }

        /// <summary>
        /// 加载数据
        /// </summary>
        private void LoadData()
        {
            plan = (Plan)Parameter[0];

            tbPlanTitle.Text = plan.Title;
        }

        /// <summary>
        /// 加载缓存数据
        /// </summary>
        private void LoadCacheData()
        {
            plan = (Plan)Caches[0];

            tbPlanTitle.Text = plan.Title;
        }

        private void bcxunjian_OnButtonClick_1(object sender, int buttonIndex)
        {
            FormManage.GotoNext("FrmTaskDetail", null,null, true);
           
        }

        private void imageButton1_Click(object sender, EventArgs e)
        {
            FormManage.GotoNext("FrmGroundPatrol", new object[] { plan, "直埋电缆以及隧道地面巡视" }, new object[] { plan }, false);
        }

        private void imageButton2_Click(object sender, EventArgs e)
        {

            FormManage.GotoNext("FrmGroundPatrol", new object[] { plan, "隧道内部巡视" }, new object[] { plan }, false);
        }

        private void imageButton3_Click(object sender, EventArgs e)
        {
            FormManage.GotoNext("FrmElseWork", new object[] { plan }, new object[] { plan }, false);
        }


    }
}